#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int is_Prime(size_t* arr,size_t n)
{
	int i = 0;
	size_t m = arr[n];
	for (i = 2; i < m; i++)
	{
		if (m % i == 0)
		{
			return 0;
		}
	}
	return 1;
}
void print(int ret)
{
	if (ret)
	{
		printf("true\n");
	}
	else
	{
		printf("false\n");
	}
}
int main()
{
	size_t n = 0;
	scanf("%zd", &n);
	size_t arr[100] = {0};
	for (int i = 0; i < n; i++)
	{
		scanf("%zd", &arr[i]);
	}
	for (int i = 0; i < n; i++)
	{
		int ret = is_Prime(arr, i);
		print(ret);
	}
	return 0;
}